<?php
class My_Controllers extends Zend_Controller_Action {
	public function init() {
		$this->view->timer = new My_Timer ( );
		$this->view->timer->start ();
		
		$this->front = Zend_Controller_Front::getInstance ();
		$this->db = Zend_Registry::get ( 'db' );
		
		$this->page = new My_Page ( );
		$this->news = new Article ( );
		$this->user = new User ( );
		$this->keshi = new Keshi ( );
		$this->lanmu = new Lanmu ( );
		
		Zend_Layout::startMvc ( array ('layoutPath' => '../application/default/views/layouts' ) );
		
		$response = $this->getResponse ();
		$response->insert ( 'footer', $this->view->render ( 'footer.php' ) );
		$response->insert ( 'header', $this->view->render ( 'header.php' ) );
		$this->_helper->layout ()->setViewSuffix ( 'php' );
		$this->view->headTitle ( '天津中医药大学第二附属医院网站' );
		$this->view->headTitle ()->setSeparator ( ' / ' );
	}
	public function preDispatch() {
		$this->front = Zend_Controller_Front::getInstance ();
		$this->view->setHelperPath ( '../application/default/views/helpers', 'My_View_Helper' );
	}
}
		
